package com.kefu.chat.mapper;

import org.apache.ibatis.annotations.Select;

import com.kefu.chat.model.ChatReply;
import com.kefu.common.mybatis.KefuMapper;

public interface ChatReplyMapper extends KefuMapper<ChatReply> {

    @Select("select COALESCE(max(weight),0) from chat_reply where  tenant_id = #{arg0} and parent_id = #{arg1}")
    int getMaxWeight(String tenantId, String parentId);

    @Select("delete from chat_reply where tenant_id = #{arg0} and parent_id = #{arg1}")
    void deleteByParentId(String tenantId, String parentId);
}